package com.youpai.platform.vulture.service.handler.event;

import com.youpai.platform.common.exceptions.RemoteException;
import com.youpai.platform.vulture.service.channel.VultureChannel;
import com.youpai.platform.vulture.service.constant.BizConstants;
import com.youpai.platform.vulture.service.handler.detection.UnHandSharkConnectionCleanHandler;
import com.youpai.platform.vulture.service.handler.vulture.ConnectHandler;
import com.youpai.platform.vulture.service.support.DetectionSupport;
import io.netty.util.HashedWheelTimer;
import java.util.concurrent.TimeUnit;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @date: 2022/7/10 22:42
 * @author: Anna
 * @version: 1.0
 * @description: 连接vulture通道处理
 */
@Slf4j
@Component
public class ConnectedVultureChannelMessageHandler implements ConnectHandler {

    @Override
    public void handle(VultureChannel vultureChannel) throws RemoteException {
        log.info("vulture连接 - {}", vultureChannel);
        // 开启未握手连接清理功能
        DetectionSupport.cleanUnHandSharkConnection(vultureChannel);
    }
}
